//
//  AGNetRequestHistoryDetailVC.swift
//  AG_Test
//
//  Created by AG on 2020/12/3.
//

import UIKit

class AGNetRequestHistoryDetailVC: UIViewController {

    var textView: UITextView = UITextView()
    var dic: [String: Any]!
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "请求详情"
        self.view.backgroundColor = UIColor.white
        self.createLabel()
        self.createTextView()
    }
    
    func createLabel() {
        let label = UILabel()
        let str = self.dic["date"] as! String
        label.text = str
        label.font = UIFont.systemFont(ofSize: 14)
        self.view.addSubview(label)
        label.snp.makeConstraints { (make) in
            make.left.top.equalToSuperview().offset(15)
            make.right.equalToSuperview().inset(15)
            make.height.equalTo(16)
        }
    }
    
    func createTextView() {
        let space : CGFloat = 15
        let textH : CGFloat = 50
        textView.textAlignment = .left
        textView.keyboardType = .default
        textView.isUserInteractionEnabled = true
        textView.font = UIFont.systemFont(ofSize: 14)
        textView.textColor = UIColor.black
        textView.backgroundColor = UIColor.clear
        textView.layer.borderWidth = 0.5
        textView.layer.borderColor = UIColor.gray.cgColor
        let obj = self.dic["content"] as! [String: Any]
        textView.text = "\(obj)"
        self.view.addSubview(textView)
        
        textView.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(space)
            make.right.equalToSuperview().inset(space)
            make.top.equalToSuperview().offset(40)
            make.bottom.equalToSuperview().inset(textH)
        }
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
